#ifndef ILogger_h__
#define ILogger_h__

enum LOG_LEVEL
{
	LOG_LEVEL_TRACE = 0,
	LOG_LEVEL_DEBUG,
	LOG_LEVEL_INFO,
	LOG_LEVEL_WARN,
	LOG_LEVEL_ERROR,
	LOG_LEVEL_ALARM,
	LOG_LEVEL_FATAL,
};

static const char *const LOG_STRING[] =
{
	"TRACE",
	"DEBUG",
	"INFO ",
	"WARN ",
	"ERROR",
	"ALARM",
	"FATAL",
};

class ILogger
{
public:
	virtual ~ILogger(){}

public:
	virtual bool IsEnable(LOG_LEVEL lv) = 0;
	virtual void SetLevel(LOG_LEVEL lv) = 0;

	virtual const char * getLoggerName() = 0;

	virtual bool Write(LOG_LEVEL lv, const char* fmt, ...) = 0;
};

class ILoggerManager
{
public:
	virtual ~ILoggerManager() {}
public:
	virtual ILogger* getLogger(const char * pszLogName) = 0;
};

#endif // ILogger_h__
